/**
 * 管理人员类（月薪+奖金计薪）
 */
class Manager extends Employee {
    private double monthlySalary; // 月基本工资
    private double bonus;         // 绩效奖金

    // 构造方法
    public Manager(String name, String empId, String username, String password,
                   double monthlySalary, double bonus) {
        super(name, empId, username, password);
        this.monthlySalary = monthlySalary;
        this.bonus = bonus;
    }

    // 计算薪资（基本工资+奖金）
    @Override
    public double calculateSalary() {
        return monthlySalary + bonus;
    }

    // 生成工资条
    @Override
    public String generatePaySlip() {
        return "工资条\n" +
                "员工姓名：" + name + "\n" +
                "工号：" + empId + "\n" +
                "员工类型：管理人员\n" +
                "基本工资：" + monthlySalary + "元\n" +
                "绩效奖金：" + bonus + "元\n" +
                "本月薪资：" + calculateSalary() + "元";
    }

    // 修改月薪和奖金（可选功能）
    public void setMonthlySalary(double monthlySalary) { this.monthlySalary = monthlySalary; }
    public void setBonus(double bonus) { this.bonus = bonus; }
}